<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="com.store.application.Product" import="java.util.List"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Order</title>
</head>
<body>

<form action="/venteEnLigne/listOfProducts" method="post">
	
	<table>
		<tr>
			<th>Identifier</th>
			<th>Price</th>
			<th>Description</th>
			<th>Select</th>
		</tr>

		<% 	List<Product> products = (List<Product>)request.getAttribute("products");
			Product product;
			for(int i=0; i<products.size(); i++){
				product = products.get(i);
		%>

		<tr>
			<td><%=product.getId()%></td>
			<td><%=product.getPrice()%></td>
			<td><%=product.getDescription()%></td>
			<td><input type="checkbox" name="productID<%=product.getId()%>" value="<%=product.getId()%>"></td>
		</tr>

		<% } %>		
	</table>
	
	<input type="submit" name="order" value="order now">
	<input type="submit" name="order" value="cancel">
	
</form>
</body>
</html>